package io;

import java.io.*;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw=new PrintWriter("pw.txt");
        pw.println("和我在成都的街头走一走，哦哦哦...");
        pw.println("直到所有的灯都熄灭了");
        System.out.println("写入成功！");
        pw.close();



        /*
        FileOutputStream fos=new FileOutputStream("pw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos);
        BufferedWriter bw=new BufferedWriter(osw);
        bw.write("和我在成都的街头走一走，哦哦哦...");
        bw.write("直到所有的灯都熄灭了");
        System.out.println("写入成功！");
        bw.close();

         */

    }
}
